arm64/efi: Disable secure boot if shim is in insecure mode
authorLinn Crosetto <linn@hpe.com>
Mon, 22 Feb 2016 19:54:37 +0000 (12:54 -0700)
committerYves-Alexis Perez <corsac@debian.org>
Fri, 9 Feb 2018 12:58:52 +0000 (12:58 +0000)
commitc8f7063ab494e004dbfe664d5080f9b8784dc142
tree8089c200349ef1f3ff69a9b7c008a347a8e27d41
parent0f3c730c1515a6253582fb5c0d223d1cf64941ae
arm64/efi: Disable secure boot if shim is in insecure mode

Port to arm64 a patch originally written by Josh Boyer for the x86 EFI
stub.

A user can manually tell the shim boot loader to disable validation of
images it loads.  When a user does this, it creates a UEFI variable called
MokSBState that does not have the runtime attribute set.  Given that the
user explicitly disabled validation, we can honor that and not enable
secure boot mode if that variable is set.

Signed-off-by: Linn Crosetto <linn@hpe.com>
Cc: Josh Boyer <jwboyer@fedoraproject.org>
Gbp-Pq: Topic features/all/securelevel
Gbp-Pq: Name arm64-efi-disable-secure-boot-if-shim-is-in-insecure.patch
drivers/firmware/efi/libstub/arm-stub.c